const logger = require('../utils/logger')
module.exports = async (ctx, next) => {
  try {
    let ret = await next()
  } catch (err) {
    logger.info('error ', err.status, err.message)
    ctx.response.status = err.status || 500;
    ctx.response.body = {
      message: err.message
    }
  }
}